<{extends file="$tpl_dir/tpl_base.htm"}>
<{block name="main"}>
<{$invalid_confirm = [
	'title' => '确定将选择的用户设为失效？',
	'desc' => '确定后，用户将无法享受年金发放'
]}>
<div class="main-head">
  <div class="main-head_title">
    <h2>年金用户</h2>
  </div>
  <div class="main-head_nav">
  	<a href="<{$url.base}>/" <{if !isset($gets.status) || $gets.status === ''}> class="active"<{/if}>>全部用户</a>
	<{foreach $options.status as $key => $value}>
	<a href="<{$url.base}>/?status=<{$key}>" <{if $gets.status === <{$key}>}> class="active"<{/if}>><{$value}>用户</a>
	<{/foreach}>
  </div>
</div>
<div class="main-body">
  <div class="mod-tips">提示：只有正常状态的用户才可享受年金发放</div>
  <div class="main-action">
  	<a href="<{$url.base}>/create" class="mod-btn mod-btn_primary">新增</a>
	<a href="javascript:;" data-action="invalid" data-confirm="<{$invalid_confirm|json_encode|escape}>" class="mod-btn j-action">设为失效</a>
	<div class="main-search">
      <form method="get">
	    <input type="hidden" name="status" value="<{$gets.status}>">
		<select name="level" class="mod-slct">
		    <option value="">全部级别</option>
		  	<{foreach $options.level as $key => $value}>
			<option value="<{$key}>" <{if $gets.level == $key}>selected<{/if}>><{$value.label}></option>
			<{/foreach}>
        </select>
        <input type="text" name="keyword" class="mod-inpt" placeholder="姓名关键字或手机号码" value="<{$gets.keyword}>">
        <input type="submit" class="mod-btn mod-btn_primary" value="搜索">
      </form>
    </div>
  </div>
  <div class="mod-box">
    <table class="mod-table">
      <thead>
        <tr>
          <th class="col-chkbox"><label class="mod-chkbox">
            <input type="checkbox" data-action="chkall">
            </label></th>
          <th>ID</th>
          <th>姓名</th>
		  <th>手机号码</th>
		  <th>年金级别</th>
		  <th>年金总额</th>
          <th>创建时间</th>
		  <th>状态</th>
          <th class="col-operate">操作</th>
        </tr>
      </thead>
      <tbody>
      <{foreach $list as $row}>
      <tr>
        <td class="col-chkbox"><label class="mod-chkbox">
          <input type="checkbox" name="chkid[]" value="<{$row.id}>">
          </label></td>
        <td><{$row.id}></td>
        <td><{$row.name}></td>
		<td><{$row.phone}></td>
		<td><{$options.level[$row.level].label}></td>
		<td><{$row.total}></td>
        <td><{$row.createtime|date_format:"%Y-%m-%d %H:%M:%S"}></td>
		<td><{if !$row.status}><font color="#e43"><{$options.status[$row.status]}></font><{else}><{$options.status[$row.status]}><{/if}></td>
        <td class="col-operate"><a href="<{$url.base}>/edit?id=<{$row.id}>">编辑</a></td>
      </tr>
      <{/foreach}>
      </tbody>
    </table>
	<{if !$list}>
    <div class="mod-nothing">暂无信息</div>
    <{/if}>
  </div>
  <{if $list}>
  <div class="pagination"><{$show_page}></div>
  <{/if}> </div>
<{/block}>